//
//  TestJSObject.h
//  BaseProject
//
//  Created by lzy on 16/7/6.
//  Copyright © 2016年 zhp. All rights reserved.
//

#import <Foundation/Foundation.h>
#import <JavaScriptCore/JavaScriptCore.h>
#import "MGConstFile.h"
//首先创建一个实现了JSExport协议的协议
@protocol TestJSObjectProtocol <JSExport>

//此处我们测试几种参数的情况
-(void)share:(NSArray *)arr;
-(void)toCredit:(int)type;
-(void)back;
-(void)backFirstSheet;

//客服
-(void)service:(NSString *)str;
-(void)tagOfService:(NSArray *)array;


-(void)onlineAss;
- (NSString *)getHeader;
-(void)incoming:(NSArray *)str;
-(void)question;
-(void)ransomFloor;

-(void)savePic:(NSString *)url;
//index0(哪张图片 下标)  index1(图片url)
-(void)sharePic:(NSArray *)type;
//index0(哪张图片 下标)  index1(缩略图url) index2(标题)  index3(描述)
-(void)selectedPic:(NSArray *)type;




-(void)goBack;
-(void)jumpApp:(NSString *)str;

@end

@interface TestJSObject : NSObject<TestJSObjectProtocol>

@property(nonatomic,copy)void(^sharePicBlock)(NSArray *);
@property(nonatomic,copy)void(^selectedPicBlock)(NSArray *);

@property(nonatomic,copy)void(^adTypeBlock)(int);
@property(nonatomic,copy)void(^shareBlock)(NSArray *);
@property(nonatomic,copy)void(^backBlock)();
@property(nonatomic,copy)void(^serviceBlock)(NSString *);

@property(nonatomic,copy)void(^onlineAssBlock)();

@property(nonatomic,copy)void(^incomingBlock)(NSArray *);

@property(nonatomic,copy)void(^questionBlock)();
@property(nonatomic,copy)void(^shulouBlock)();
@property(nonatomic,copy)void(^backFirstSheetBlock)();

@property(nonatomic,copy)void(^savePicBlock)(NSString *);



@property(nonatomic,copy)void(^goBackBlock)();
@property(nonatomic,copy)void(^jumpAppBlock)(NSString *);


@end
